//
//  CeHuaViewController.m
//  庐山通
//
//  Created by xiaobo on 15-11-5.
//  Copyright (c) 2015年 郑朝军. All rights reserved.
//

#import "CeHuaViewController.h"
#import <UIKit/UIKit.h>
#import "Grouble.h"


@interface CeHuaViewController ()<UITableViewDataSource,UITableViewDelegate>
@property (nonatomic,weak) UITableView * tableview ;
@end

@implementation CeHuaViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    ZCJLog(@"%ld",self.indexpathRow);
    [self addNav];
    [self setTableView];
    //self.view.backgroundColor = [UIColor redColor];
    // Do any additional setup after loading the view.
}

- (void)addNav
{
    self.navigationItem.leftBarButtonItem =[UIBarButtonItem itemWithIcon:@"navigationbar_pop" highIcon:@"navigationbar_pop_highlighted" target:self action:@selector(pop)];
    
    if (self.indexpathRow == 0) {
        self.navigationItem.title = @"开通会员";
    } else if (self.indexpathRow == 1) {
        self.navigationItem.title = @"我的钱包";
    } else if (self.indexpathRow == 2) {
        self.navigationItem.title = @"网上营业厅";
    } else if (self.indexpathRow == 3) {
        self.navigationItem.title = @"个性装扮";
    } else if (self.indexpathRow == 4) {
        self.navigationItem.title = @"我的收藏";
    } else if (self.indexpathRow == 5) {
        self.navigationItem.title = @"我的相册";
    } else if (self.indexpathRow == 6) {
        self.navigationItem.title = @"我的文件";
    }
}
- (void)pop
{
    [self dismissViewControllerAnimated:YES completion:nil];
}
- (void)setTableView
{
    UITableView * tableview = [[UITableView alloc]initWithFrame:self.view.bounds];
    tableview.delegate = self;
    tableview.dataSource = self;
    
    [self.view addSubview:tableview];
    self.tableview = tableview;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return 3;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    static NSString * ID = @"jjj";
    UITableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:ID];
    if (cell  == nil) {
        cell  = [[UITableViewCell alloc]initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:ID];
    }
//    CGFloat imgW = ScreenWidth / 2;
//    CGFloat imgH = imgW;
    cell.imageView.image = [UIImage imageNamed:@"new_dot_os7"];
   // cell.imageView.frame = CGRectMake(0, 0, imgW, imgH);
    cell.textLabel.text = @"话费&流量";
    
    return cell;
}
// 
- (void)tableView:(UITableView *)tableView didDeselectRowAtIndexPath:(NSIndexPath *)indexPath
{
    
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
